package com.jack.mvvmexample.vm

import androidx.lifecycle.MutableLiveData
import com.aleyn.mvvm.base.BaseViewModel
import com.jack.mvvmexample.api.InjectorUtil
import com.jack.mvvmexample.api.repositorys.HomeRepository
import com.jack.mvvmexample.bean.UserBean

class HomeViewModel : BaseViewModel(){

    var mResultData = MutableLiveData<List<UserBean>>()

    val mRepository by lazy { InjectorUtil.getHomeRepository() }

    fun getHomeList() : MutableLiveData<List<UserBean>>{
        launchGo({
            mResultData.value = mRepository.getVideoList().data } )
        return mResultData
    }
}